<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:s="http://jboss.com/products/seam/taglib"
	xmlns:ctg="http://www.crotouristguide.com/taglib">

<ui:component>

	<h:form>
		<rich:dataTable value="#{dogadjajiByKorisnik}" var="dogadjaj"
			columns="1" rows="15" width="100%">
			<h:column>
				<f:subview
					rendered="#{dogadjaj.getOpis(locale.language).naziv.length() > 0}">
					<h:outputText
						value="#{dogadjaj.getOpis(locale.language).naziv}" />,
				</f:subview>
				<h:outputLink
					value="#{application.contextPath}/guides/mjesta/mjesto.seam">
					<f:param name="idMjesta" value="#{dogadjaj.mjesto.idMjesta}" />
					<f:param name="l" value="#{currentLang}" />
					<f:param name="title" value="#{titleAction.getUrlTitle(mjesto)}"/>
					<h:outputText value="#{dogadjaj.mjesto.naziv}" />
				</h:outputLink>
				<br />
				<f:subview
					rendered="#{dogadjaj.getOpis(locale.language).opis.length() > 0}">
					<h:outputText
						value="#{dogadjaj.getOpis(locale.language).opis}" />
					<br />
				</f:subview>
				<f:subview rendered="#{dogadjaj.www != null and dogadjaj.www.length() > 0}">
					<h:outputText value="#{messages['label.web.address']} " />
					<h:outputLink value="#{dogadjaj.www}" styleClass="new-window">
						<h:outputText value="#{dogadjaj.www}" />
					</h:outputLink>				
					<br />
				</f:subview>
				<s:link value="#{messages['label.edit']}"
					action="#{dogadjajAction.editSetup('backToDogadjaji')}">
					<f:param name="idMjesta" value="#{dogadjaj.mjesto.idMjesta}" />
				</s:link>
				<div><h:outputText
					value="#{dogadjaj.datumOd} - #{dogadjaj.datumDo}" /></div>
				<s:div styleClass="rich-separator"></s:div>
				<br />
			</h:column>
			<f:facet name="footer">
				<rich:datascroller></rich:datascroller>
			</f:facet>
		</rich:dataTable>
	</h:form>
</ui:component>
</html>